/**
*  \file specs_hw.c
*
*  \brief
*
*  \author Li Dajin  <Dajin.Li@Linde-China.com>
*
*
*/

#ifndef SPECS_HW_H_INCLUDED
#define SPECS_HW_H_INCLUDED


/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"

/*================================================[ public defines   ]================================================*/

/*================================================[ public datatypes ]================================================*/

typedef struct
{
   F32   ADC_Resol_UBat     	;  /* ADC-Resolution from Battery-Signals  				      		*/
   F32   ADC_Resol_Curr	    	;  /* ADC-Resolution from Signals with solenoid current signals without OP       	*/
   F32   ADC_Resol_Curr_op  	;  /* ADC-Resolution from Signals with solenoid current signals with OP          	*/

   F32   ADC_Resol_13V          ;  /* A/D-C resolution in Volt for signals with 13V nominal magnitude                   */
   F32   ADC_Resol_5V 	        ;  /* A/D-C resolution in Volt for signals with  5V nominal magnitude                   */
   F32   ADC_Resol_Relsts 	;  /* A/D-C resolution in Volt for relay  status signal                                 */
   F32   ADC_Resol_Outsts       ;  /* A/D-C resolution in Volt for output status signal                                 */

   F32   ConNomVolt  		;  /* nominal mean voltage upon contactor solenoid                                      */
   F32   DelBatCapVolt		;  /* allowed voltage drop at the contactor between battery and capacitor voltage       */

   S16   Cal_Umin_BDI_value     ;  /* Production parameter min value [digits]                                           */
   S16   Cal_Umax_BDI_value     ;  /* Production parameter max value [digits]                                           */
   F32   Cal_Ucal_BDI_value     ;  /* Specific calibration voltage [Volt]                                               */
   F32   Cal_Udef_BDI_Resol     ;  /* A/D-C resolution [Volt/Digit] for battery voltage used for BDI                    */

   S16   Cal_Umin_1MX_value     ;  /* Production parameter min value [digits]                                           */
   S16   Cal_Umax_1MX_value     ;  /* Production parameter max value [digits]                                           */
   F32   Cal_Ucal_1MX_value     ;  /* Specific phase calibration voltage [Volt]                                         */
   F32   Cal_Udef_1MX_Resol     ;  /* A/D-C resolution [Volt/Digit]s for trac motors phase voltage signals              */

   F32   UPull_In_CMAIN         ;  /* pull-in voltage in V upon solenoid of Main Contactor                              */
   F32   UNominal_CMAIN         ;  /* nominal voltage in V upon solenoid of Main Contactor                              */

   F32   UPull_In_BrValve       ;  /* pull-in voltage in V upon solenoid of Main Contactor                              */
   F32   UNominal_BrValve       ;  /* nominal voltage in V upon solenoid of Main Contactor                              */
}
HW_SPECS;

/*================================================[ public variables ]================================================*/

extern const HW_SPECS *specs_hw;

/*================================================[ public functions ]================================================*/

RC specs_initialize_hardware(S16 te_BattType_par);

/*====================================================================================================================*/


#endif

/***********************************************************************************************************************
*                             Copyright 2009 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/
